<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>完本小说</title>
    <link rel="stylesheet" type="text/css" href="CSS/all.css"  th:href="@{/CSS/all.css}"/>
    <link rel="stylesheet" type="text/css" href="CSS/fl.css" th:href="@{/CSS/fl.css}"/>
    <script th:src="@{/JS/jquery.js}"></script>
 
</head>
<body>
        <header>全本</header>
        <div class="title">
            <a th:href="@{/Story/getAllCategoryStoryList(isLogin='')}" >首页</a>
            <a th:href="@{/Category/getBookByCategoryId(CategoryId=0)}">分类</a>
            <a th:href="@{/ReadLog/getReadPage(index=5)}">排行</a>
            <a th:href="@{/Story/getStoryEndPage(status='已完结')}" class="activetitle">全本</a>
            <a th:href="@{/Store/getUserInfo}">会员中心</a>
        </div>
            <main>
                <div class="searchinput">
                    <input class="searchBook" type="text"  placeholder="请输入书名或作者" />
                    <button  class="search"><svg class="icon" style="width: 1.5rem; height: 1.5rem;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1128"><path d="M963.80969 874.914509 746.640896 653.056614c-3.587891-3.66551-7.710925-6.443725-12.110336-8.352256 46.655488-62.60183 74.359501-140.751667 74.359501-225.526477 0-205.788877-163.237376-372.568371-364.609741-372.568371C242.909082 46.60951 79.67785 213.390029 79.67785 419.177984c0 205.792973 163.231232 372.569395 364.603597 372.569395 92.421632 0 176.807936-35.134157 241.069056-93.044122 1.778586 3.55799 4.115866 6.89705 7.027302 9.871872l217.115546 221.85687c14.970573 15.300506 39.292518 15.300506 54.316237 0C978.780262 915.131494 978.780262 890.21399 963.80969 874.914509zM444.281446 732.950221c-169.564672 0-307.06176-140.4928-307.06176-313.772237 0-173.332685 137.496064-313.766195 307.06176-313.766195 169.570816 0 307.06176 140.433408 307.06176 313.766195C751.343206 592.457421 613.851238 732.950221 444.281446 732.950221z" p-id="1129"></path></svg></button>
                </div>

                    <div th:if="${StoryEndList['objs'].size()<=0}" class="nullWbxs" style="text-align: center;margin: 30px;">暂无数据</div>
                    <div th:if="${StoryEndList['objs'].size()>0}">
                        <ul th:each="EndList : ${StoryEndList['objs']}">
                                <li><span class="" th:text="${EndList.categoryName}" ></span><a href="" th:text="${EndList.name}"></a><span th:text="${EndList.author}"></span></li>
                        </ul>
                            <div class="fycontrol">
                                <div class="fenye">
                                    <a th:if="${StoryEndList['currentPage']>1}" href="" th:href="@{/Story/getStoryEndPage(status='已完结',page=0)}">首页</a>
                                    <a th:if="${StoryEndList['currentPage']>1}" th:href="@{/Story/getStoryEndPage(status='已完结',page=${StoryEndList['currentPage']-1})}">上一页</a>
                                    <a th:if="${StoryEndList['currentPage']<StoryEndList['total']}" th:href="@{/Story/getStoryEndPage(status='已完结',page=${StoryEndList['currentPage']}==${StoryEndList['total']}?${StoryEndList['total']}:${StoryEndList['currentPage']+1})}">下一页</a>
                                    <a th:if="${StoryEndList['currentPage']<StoryEndList['total']}" th:href="@{/Story/getStoryEndPage(status='已完结',page=${StoryEndList['total']})}">尾页</a>
                                </div>
                                <div class="yema">第<span>[[${StoryEndList['currentPage']}]]/[[${StoryEndList['total']}]]</span>页<input class="tz" type="text" /><button>跳转</button></div>
                             </div>
                    </div>
            </main>
      
            <footer>
                    本站所有小说为转载作品，所有章节均由网友上传，转载至本站只是为了宣传本书让更多读者欣赏。
            </footer>
</body>
<script th:inline="javascript">
    $(".yema>button").click(function () {
        var page = $(".tz").val();
        if (page==null){
            page=1;
        }
        location.href = '/Story/getStoryEndPage?status=已完结&page=' + page;
    })

    //搜索条件
    var searchName = [[${StoryEndList['nameOrAuthor']}]];
    if (searchName != "" && searchName != null && searchName != undefined) {
        $(".searchBook").val(searchName);
    }
    //搜索书签
    $('button.search').click(function(){
        var nameOrAuthor = $(".searchBook").val();
        console.log(nameOrAuthor);
        location.href='/Story/getStoryEndPage?status=已完结&nameOrAuthor='+nameOrAuthor;
    })
</script>

</html>
